import React from 'react'
import './login.css'
import { Select,Input,Button } from 'antd'
import { useNavigate } from 'react-router-dom';
const handleChange = (value) => {
    console.log(value); // { value: "lucy", key: "lucy", label: "Lucy (101)" }
};
export default function Login() {
    let arr = [
        {
            value:'china',
            label:'中国+86'
        },
        {
            value:'',
            label:'中国+86'
        },
        {
            value:'',
            label:'中国+86'
        },
        {
            value:'',
            label:'中国+86'
        },
        {
            value:'',
            label:'中国+86'
        },

    ];
    let nav = useNavigate();
  return (
    <>
      <div className='login-layout'>
        <div>
            <img src={require('../../static/images/logo.png')} alt="" />
        </div>
        <div>
            <ul>
                <li>
                    <h3>登录</h3>
                </li>
                <li>
                    <Select
                        labelInValue
                        defaultValue={{
                          value: 'china',
                          label: '中国+86',
                        }}
                        style={{
                          width: 96,
                          height: 36
                        }}
                        onChange={handleChange}
                        options={arr}   
                    />
                    <Input 
                        style={{
                            width: 240,
                            height: 36
                        }}
                        placeholder="请输入手机号"
                        type='number'
                    />
                </li>
                <li>
                    <Input.Password 
                        style={{
                            width: 345,
                            height: 36
                        }}
                        placeholder="请输入密码"
                    />
                </li>
                <li>
                    <Button
                        style={{
                            width: 345,
                            height: 36,
                            background:'#8479E3',
                            color:'#fff'
                        }}
                        onClick={()=>{
                            localStorage.setItem('token','123456');
                            nav('/');
                        }}
                    >登录</Button>
                </li>
                <li>
                    <span>忘记密码</span>
                    <span>免费注册</span>
                </li>
            </ul>
            <div>
                <img src={require('../../static/images/wt.png')} alt="" />
            </div>
        </div>
      </div>
    </>
  )
}
